<?php
$menuStr="";
$menuStr.="<rows>";
$menuStr.="<page>1</page>";
$menuStr.="<total>1</total>";
$menuStr.="<records>1</records>";
if($user->hasCredential("app_order_manager")) {
    $menuStr.="<row><cell>1000</cell><cell>订单/生产单管理</cell><cell></cell><cell>0</cell><cell>1001</cell><cell>1010</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1002</cell><cell>订单新建列表</cell><cell>customerOrder/index</cell><cell>1</cell><cell>1002</cell><cell>1003</cell><cell>true</cell><cell>true</cell></row>";
    if($user->hasCredential("app_customer_order_audit")) {
        $menuStr.="<row><cell>1003</cell><cell>订单已审批列表</cell><cell>customerOrder/getAuditedList</cell><cell>1</cell><cell>1002</cell><cell>1003</cell><cell>true</cell><cell>true</cell></row>";
    }
    $menuStr.="<row><cell>1004</cell><cell>生产单新建列表</cell><cell>productionOrder/index</cell><cell>1</cell><cell>1002</cell><cell>1003</cell><cell>true</cell><cell>true</cell></row>";
    if($user->hasCredential("app_production_order_audit")) {
        $menuStr.="<row><cell>1005</cell><cell>生产单已审批列表</cell><cell>productionOrder/getAuditedList</cell><cell>1</cell><cell>1002</cell><cell>1003</cell><cell>true</cell><cell>true</cell></row>";
    }
}
if($user->hasCredential("app_cotton_order_manager")) {
    $menuStr.="<row><cell>1011</cell><cell>棉纱单管理</cell><cell></cell><cell>0</cell><cell>1011</cell><cell>1020</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1012</cell><cell>棉纱单新建列表</cell><cell>cottonOrder/index</cell><cell>1</cell><cell>1012</cell><cell>1013</cell><cell>true</cell><cell>true</cell></row>";
    if($user->hasCredential("app_cotton_order_audit")) {
        $menuStr.="<row><cell>1013</cell><cell>棉纱单已审批列表</cell><cell>cottonOrder/getAuditedList</cell><cell>1</cell><cell>1014</cell><cell>1015</cell><cell>true</cell><cell>true</cell></row>";
    }
}
if($user->hasCredential("app_dye_order_manager")) {
    $menuStr.="<row><cell>1021</cell><cell>浆染单生产管理</cell><cell></cell><cell>0</cell><cell>1021</cell><cell>1030</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1022</cell><cell>浆染单新建列表</cell><cell>dyeOrder/index</cell><cell>1</cell><cell>1022</cell><cell>1023</cell><cell>true</cell><cell>true</cell></row>";
    if($user->hasCredential("app_dye_order_audit")) {
        $menuStr.="<row><cell>1023</cell><cell>浆染单已审批列表</cell><cell>dyeOrder/getAuditedList</cell><cell>1</cell><cell>1022</cell><cell>1023</cell><cell>true</cell><cell>true</cell></row>";
    }
}
if($user->hasCredential("app_weave_order_manager")) {
    $menuStr.="<row><cell>1031</cell><cell>织造单生产管理</cell><cell></cell><cell>0</cell><cell>1031</cell><cell>1040</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1032</cell><cell>织造单新建列表</cell><cell>weaveOrder/index</cell><cell>1</cell><cell>1032</cell><cell>1033</cell><cell>true</cell><cell>true</cell></row>";
    if($user->hasCredential("app_weave_order_audit")) {
        $menuStr.="<row><cell>1033</cell><cell>织造单已审批列表</cell><cell>weaveOrder/getAuditedList</cell><cell>1</cell><cell>1032</cell><cell>1033</cell><cell>true</cell><cell>true</cell></row>";
    }
}
if($user->hasCredential("app_weave_qc_form_manager")) {
    $menuStr.="<row><cell>1041</cell><cell>织造QC单管理</cell><cell></cell><cell>0</cell><cell>1041</cell><cell>1050</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1042</cell><cell>织造QC单列表</cell><cell>weaveQcForm/index</cell><cell>1</cell><cell>1042</cell><cell>1043</cell><cell>true</cell><cell>true</cell></row>";
}
if($user->hasCredential("app_clean_up_form_manager")) {
    $menuStr.="<row><cell>1051</cell><cell>整理定型单管理</cell><cell></cell><cell>0</cell><cell>1051</cell><cell>1060</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1052</cell><cell>整理定型单新建列表</cell><cell>cleanUpForm/index</cell><cell>1</cell><cell>1052</cell><cell>1053</cell><cell>true</cell><cell>true</cell></row>";
    if($user->hasCredential("app_clean_up_form_audit")) {
        $menuStr.="<row><cell>1053</cell><cell>整理定型单已审批列表</cell><cell>cleanUpForm/getAuditedList</cell><cell>1</cell><cell>1052</cell><cell>1053</cell><cell>true</cell><cell>true</cell></row>";
    }
}
if($user->hasCredential("app_clean_up_qc_form_manager")) {
    $menuStr.="<row><cell>1061</cell><cell>整理QC单管理</cell><cell></cell><cell>0</cell><cell>1061</cell><cell>1070</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1062</cell><cell>整理QC单列表</cell><cell>cleanUpQcForm/index</cell><cell>1</cell><cell>1062</cell><cell>1063</cell><cell>true</cell><cell>true</cell></row>";
}
if($user->hasCredential("app_final_cloth_form_manager")) {
    $menuStr.="<row><cell>1071</cell><cell>成品出仓单管理</cell><cell></cell><cell>0</cell><cell>1071</cell><cell>1080</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1072</cell><cell>成品出仓单新建列表</cell><cell>finalClothForm/index</cell><cell>1</cell><cell>1072</cell><cell>1073</cell><cell>true</cell><cell>true</cell></row>";
    if($user->hasCredential("app_final_cloth_form_audit")) {
        $menuStr.="<row><cell>1073</cell><cell>成品出仓单已审批列表</cell><cell>finalClothForm/getAuditedList</cell><cell>1</cell><cell>1072</cell><cell>1073</cell><cell>true</cell><cell>true</cell></row>";
    }
}
if($user->hasCredential("app_statistic_manage")) {
    $menuStr.="<row><cell>1081</cell><cell>查询与统计</cell><cell></cell><cell>0</cell><cell>1081</cell><cell>1090</cell><cell>false</cell><cell>false</cell></row>";
    $menuStr.="<row><cell>1082</cell><cell>工厂库存列表</cell><cell>statistic/statisticFactory</cell><cell>1</cell><cell>1082</cell><cell>1083</cell><cell>true</cell><cell>true</cell></row>";
//    $menuStr.="<row><cell>1083</cell><cell>统计表</cell><cell>statistic/testChart</cell><cell>1</cell><cell>1082</cell><cell>1083</cell><cell>true</cell><cell>true</cell></row>";
}
$menuStr.="</rows>";
echo $menuStr;
?>